<template>
	<view class="circle">
		<view class="circle-title">加入圈子</view>
		<view class="circlelist">
			<view class="circlelist-view" v-for="(item,index) in list">
				<image src="../../static/index/quan02.png"></image>
				<view class="circlelist-view-text">{{item.name}}</view>
				<view class="circlelist-view-button" @click="qrcodeClick(item.qrcode)">加入</view>
			</view>
			
		</view>
		<view class="popup" v-if="hide == 1">
			<view class="popup-view" @click="cloneClick()"></view>
			<view class="popup-view2">
				<image class="popup-image" :src="qrcode"  show-menu-by-longpress ="true"></image>
				<view @click="cloneClick()">返回首页</view>
			</view>
			
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				hide  : 0,
				list  :[], 
				qrcode : ''
			};
		},
		created() {
			let that = this;
			that.$api.getCirclelist({}).then(res=>{
				that.list = res.data.list;
				console.log(res);
			})
			
		},
		methods:{
			qrcodeClick(e){
				this.hide   = 1;
				this.qrcode  = e;
			},
			cloneClick(){
				this.hide   = 0;
			}
		}
	}
</script>

<style lang="less">
	.circle {
		width: 750rpx;
		min-height: 200rpx;
		background-color: #fff;
		margin-top: 20rpx;
		padding-top: 30rpx;
		padding-bottom: 30rpx;
		padding-left: 20rpx;
		padding-right: 20rpx;
		.circle-title {
			font-size: 40rpx;
			padding-left: 10rpx;
		}
		.circlelist {
			margin-top: 40rpx;
			.circlelist-view {
				display: flex;
				width: 690rpx;
				border-radius: 20rpx;
				box-shadow: 0px 0px 10rpx 0px rgba(0,0,0,0.1);
				height: 110rpx;
				margin-bottom: 32rpx;
				image {
					width: 76rpx;
					height: 76rpx;
					margin-top: 34rpx;
					margin-left: 24rpx;
				}
				.circlelist-view-text {
					padding-left: 30rpx;
					line-height: 114rpx;
					font-size: 34rpx;
				}
				.circlelist-view-button {
					width: 110rpx;
					height: 56rpx;
					background: #7289FF;
					border-radius: 28rpx;
					margin-left: auto;
					text-align: center;
					color: #fff;
					margin-right: 30rpx;
					margin-top: 34rpx;
					line-height: 52rpx;
				}
				.shen {
					background-color: #7C17FF;
				}
			}
		}
		
	}
</style>